<!DOCTYPE html>
<!-- 模态窗口编辑模板 -->
<form action="" id="myform" class="form-horizontal form-bordered" novalidate="novalidate" method="post">
<!-- 窗口标题开始 -->
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
	<h4 class="modal-title" style="font-weight:bold;">发送短信</h4>
</div>
<!-- 窗口标题结束-->
<!-- 内容开始 -->
<div class="modal-body">
	<div class="portlet-body form">
		<form role="form" class="form-horizontal" id="myForm">
			<div class="form-body">
					          		<table class="table table-striped  table-advance table-hover" border="0">
							        	<tr><td>时间：</td><td><input  name="hts"  class="Wdate" type="text" readonly="readonly" id="hts" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /></td></tr>
							        	<tr><td>内容：</td><td><textarea id="SMMcontent" name="SMMcontent" rows="5" cols="60"></textarea></td></tr>
							        	<tr><td>接收手机号</td>
							        		<td><textarea name="recipientMobilePhone" readonly="readonly" rows="4" cols="60" id="recipientMobilePhone" >${recipientMobilePhone}</textarea></td>
							        	</tr>
									</table>

			</div>
		</form>
	</div>
</div>
<!-- 内容结束 -->
<!-- 底部按钮开始 -->
<div class="modal-footer">
	<button type="button" onclick="sendSMS()" class="btn green  fa fa-check"> 发送</button>
	<button type="button" class="btn default fa fa-times" data-dismiss="modal"> 关闭</button>
</div>
<!-- 结束 -->
</form>
<script>
	
	$(function(){
		$("#hts").val(new Date().format("yyyy-MM-dd hh:mm:ss"));
	});

	 //发送短信调用短信接口
	  function sendSMS(){  
		var recipientMobilePhone= $("#recipientMobilePhone").html();
		var hts = $("#hts").val();
		var SMMcontent = $("#SMMcontent").val();
		var url="${request.getContextPath()}/contacter/sendSMS.do";
			$.ajax({				
				url : url,
				data : {recipientMobilePhone:recipientMobilePhone,hts:hts,SMMcontent:SMMcontent},
				async: false,
				success : function(result) {
						  doClose();
					 	 CommonUtils.succModal("系统提示", result.message);

				}
			});
	  }

			

 </script>
